import request from '@/router/axios';
import qs from 'qs';

// 数据列表-用户
export const getUserInfOfSearch = (data) => request({
    url: '/userInfo/v1/pageQuery',
    method: 'post',
    data: qs.stringify(data),
})
// 添加-用户
export const addUserInfo = (data) => request({
    url: '/userInfo/v1/insert',
    method: 'post',
    data: qs.stringify(data),
})
// 修改-用户
export const updUserInfo = (data) => request({
    url: '/userInfo/v1/update',
    method: 'post',
    data: qs.stringify(data),
})
// 删除-用户
export const delUserInfo = (data) => request({
    url: '/userInfo/v1/getById?id='+data,
    method: 'post',
})

//根据部门主键查询用户列表
export const getUserOfDepartmentId = (data) => request({
    url: '/userInfo/v1/getDepartmentId',
    method: 'post',
    data: qs.stringify(data),
})


//获取部门和部门下所有用户信息
export const getUsergetDepartmentUser = (data) => request({
    url: '/userInfo/v1/getDepartmentUser',
    method: 'post',
    data: qs.stringify(data),
})
